package com.qf.cloud2203.service1.feign;

import com.qf.cloud2203.domain.constants.Constants;
import com.qf.cloud2203.domain.entity.Vote;
import com.qf.cloud2203.domain.vo.ResultVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.concurrent.TimeUnit;

// 引号中写要调用的微服务的名字，名字从eureka中获取
@FeignClient("SERVICE2")
public interface Service2Client {

    @RequestMapping("/service2/home")
    public String home();


    @GetMapping("/service2/findAll")
    public List<Vote> getVoteList();

    @PostMapping("/service2/update")
    Vote updateVote(@RequestBody Vote vote);

    @DeleteMapping("/service2/delete/{id}")
    Vote deleteVote(@PathVariable("id") Integer id);




}
